{"componentChunkName":"component---src-templates-blog-js","path":"/blog/2019/08/08/react-v16.9.0.html","result":{"data":{"markdownRemark":{"html":"<p>Today we are releasing React 16.9. It contains several new features, bugfixes, and new deprecation warnings to help prepare for a future major release. </p>\n<h2 id=\"new-deprecations\"><a href=\"#new-deprecations\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>New Deprecations </h2>\n<h3 id=\"renaming-unsafe-lifecycle-methods\"><a href=\"#renaming-unsafe-lifecycle-methods\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Renaming Unsafe Lifecycle Methods </h3>\n<p><a href=\"/blog/2018/03/27/update-on-async-rendering.html\">Over a year ago</a>, we announced that unsafe lifecycle methods are getting renamed:</p>\n<ul>\n<li><code class=\"gatsby-code-text\">componentWillMount</code> → <code class=\"gatsby-code-text\">UNSAFE_componentWillMount</code></li>\n<li><code class=\"gatsby-code-text\">componentWillReceiveProps</code> → <code class=\"gatsby-code-text\">UNSAFE_componentWillReceiveProps</code></li>\n<li><code class=\"gatsby-code-text\">componentWillUpdate</code> → <code class=\"gatsby-code-text\">UNSAFE_componentWillUpdate</code></li>\n</ul>\n<p><strong>React 16.9 does not contain breaking changes, and the old names continue to work in this release.</strong> But you will now see a warning when using any of the old names:</p>\n<p><img src=\"https://i.imgur.com/sngxSML.png\" alt=\"Warning: componentWillMount has been renamed, and is not recommended for use.\"></p>\n<p>As the warning suggests, there are usually <a href=\"/blog/2018/03/27/update-on-async-rendering.html#migrating-from-legacy-lifecycles\">better approaches</a> for each of the unsafe methods. However, maybe you don’t have the time to migrate or test these components. In that case, we recommend running a <a href=\"https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">«codemod»</a> script that renames them automatically:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"gatsby-code-bash\"><code class=\"gatsby-code-bash\"><span class=\"token builtin class-name\">cd</span> your_project\nnpx react-codemod rename-unsafe-lifecycles</code></pre></div>\n<p><em>(Note that it says <code class=\"gatsby-code-text\">npx</code>, not <code class=\"gatsby-code-text\">npm</code>. <code class=\"gatsby-code-text\">npx</code> is a utility that comes with Node 6+ by default.)</em></p>\n<p>Running this codemod will replace the old names like <code class=\"gatsby-code-text\">componentWillMount</code> with the new names like <code class=\"gatsby-code-text\">UNSAFE_componentWillMount</code>:</p>\n<p><img src=\"https://i.imgur.com/Heyvcyi.gif\" alt=\"Codemod in action\"></p>\n<p>The new names like <code class=\"gatsby-code-text\">UNSAFE_componentWillMount</code> <strong>will keep working in both React 16.9 and in React 17.x</strong>. However, the new <code class=\"gatsby-code-text\">UNSAFE_</code> prefix will help components with problematic patterns stand out during the code review and debugging sessions. (If you’d like, you can further discourage their use inside your app with the opt-in <a href=\"/docs/strict-mode.html\">Strict Mode</a>.)</p>\n<blockquote>\n<p>Note</p>\n<p>Learn more about our <a href=\"/docs/faq-versioning.html#commitment-to-stability\">versioning policy and commitment to stability</a>.</p>\n</blockquote>\n<h3 id=\"deprecating-javascript-urls\"><a href=\"#deprecating-javascript-urls\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Deprecating <code class=\"gatsby-code-text\">javascript:</code> URLs </h3>\n<p>URLs starting with <code class=\"gatsby-code-text\">javascript:</code> are a dangerous attack surface because it’s easy to accidentally include unsanitized output in a tag like <code class=\"gatsby-code-text\">&lt;a href></code> and create a security hole:</p>\n<div class=\"gatsby-highlight\" data-language=\"jsx\"><pre class=\"gatsby-code-jsx\"><code class=\"gatsby-code-jsx\"><span class=\"token keyword\">const</span> userProfile <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\n  <span class=\"token literal-property property\">website</span><span class=\"token operator\">:</span> <span class=\"token string\">\"javascript: alert('you got hacked')\"</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">;</span>\n<span class=\"token comment\">// This will now warn:</span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>a</span> <span class=\"token attr-name\">href</span><span class=\"token script language-javascript\"><span class=\"token script-punctuation punctuation\">=</span><span class=\"token punctuation\">{</span>userProfile<span class=\"token punctuation\">.</span>website<span class=\"token punctuation\">}</span></span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\">Profile</span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>a</span><span class=\"token punctuation\">></span></span></code></pre></div>\n<p><strong>In React 16.9,</strong> this pattern continues to work, but it will log a warning. If you use <code class=\"gatsby-code-text\">javascript:</code> URLs for logic, try to use React event handlers instead. (As a last resort, you can circumvent the protection with <a href=\"/docs/dom-elements.html#dangerouslysetinnerhtml\"><code class=\"gatsby-code-text\">dangerouslySetInnerHTML</code></a>, but it is highly discouraged and often leads to security holes.)</p>\n<p><strong>In a future major release,</strong> React will throw an error if it encounters a <code class=\"gatsby-code-text\">javascript:</code> URL.</p>\n<h3 id=\"deprecating-factory-components\"><a href=\"#deprecating-factory-components\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Deprecating «Factory» Components </h3>\n<p>Before compiling JavaScript classes with Babel became popular, React had support for a «factory» component that returns an object with a <code class=\"gatsby-code-text\">render</code> method:</p>\n<div class=\"gatsby-highlight\" data-language=\"jsx\"><pre class=\"gatsby-code-jsx\"><code class=\"gatsby-code-jsx\"><span class=\"token keyword\">function</span> <span class=\"token function\">FactoryComponent</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n  <span class=\"token keyword\">return</span> <span class=\"token punctuation\">{</span> <span class=\"token function\">render</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span> <span class=\"token keyword\">return</span> <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>div</span> <span class=\"token punctuation\">/></span></span><span class=\"token punctuation\">;</span> <span class=\"token punctuation\">}</span> <span class=\"token punctuation\">}</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n<p>This pattern is confusing because it looks too much like a function component — but it isn’t one. (A function component would just return the <code class=\"gatsby-code-text\">&lt;div /></code> in the above example.)</p>\n<p>This pattern was almost never used in the wild, and supporting it causes React to be slightly larger and slower than necessary. So we are deprecating this pattern in 16.9 and logging a warning if it’s encountered. If you rely on it, adding <code class=\"gatsby-code-text\">FactoryComponent.prototype = React.Component.prototype</code> can serve as a workaround. Alternatively, you can convert it to either a class or a function component.</p>\n<p>We don’t expect most codebases to be affected by this.</p>\n<h2 id=\"new-features\"><a href=\"#new-features\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>New Features </h2>\n<h3 id=\"async-act-for-testing\"><a href=\"#async-act-for-testing\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Async <a href=\"/docs/test-utils.html#act\"><code class=\"gatsby-code-text\">act()</code></a> for Testing </h3>\n<p><a href=\"/blog/2019/02/06/react-v16.8.0.html\">React 16.8</a> introduced a new testing utility called <a href=\"/docs/test-utils.html#act\"><code class=\"gatsby-code-text\">act()</code></a> to help you write tests that better match the browser behavior. For example, multiple state updates inside a single <code class=\"gatsby-code-text\">act()</code> get batched. This matches how React already works when handling real browser events, and helps prepare your components for the future in which React will batch updates more often.</p>\n<p>However, in 16.8 <code class=\"gatsby-code-text\">act()</code> only supported synchronous functions. Sometimes, you might have seen a warning like this in a test but <a href=\"https://github.com/facebook/react/issues/14769\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">could not easily fix it</a>:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"gatsby-code-text\"><code class=\"gatsby-code-text\">An update to SomeComponent inside a test was not wrapped in act(...).</code></pre></div>\n<p><strong>In React 16.9, <code class=\"gatsby-code-text\">act()</code> also accepts asynchronous functions,</strong> and you can <code class=\"gatsby-code-text\">await</code> its call:</p>\n<div class=\"gatsby-highlight\" data-language=\"jsx\"><pre class=\"gatsby-code-jsx\"><code class=\"gatsby-code-jsx\"><span class=\"token keyword\">await</span> <span class=\"token function\">act</span><span class=\"token punctuation\">(</span><span class=\"token keyword\">async</span> <span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span> <span class=\"token operator\">=></span> <span class=\"token punctuation\">{</span>\n  <span class=\"token comment\">// ...</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<p>This solves the remaining cases where you couldn’t use <code class=\"gatsby-code-text\">act()</code> before, such as when the state update was inside an asynchronous function. As a result, <strong>you should be able to fix all the remaining <code class=\"gatsby-code-text\">act()</code> warnings in your tests now.</strong></p>\n<p>We’ve heard there wasn’t enough information about how to write tests with <code class=\"gatsby-code-text\">act()</code>. The new <a href=\"/docs/testing-recipes.html\">Testing Recipes</a> guide describes common scenarios, and how <code class=\"gatsby-code-text\">act()</code> can help you write good tests. These examples use vanilla DOM APIs, but you can also use <a href=\"https://testing-library.com/docs/react-testing-library/intro\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">React Testing Library</a> to reduce the boilerplate code. Many of its methods already use <code class=\"gatsby-code-text\">act()</code> internally.</p>\n<p>Please let us know <a href=\"https://github.com/facebook/react/issues\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">on the issue tracker</a> if you bump into any other scenarios where <code class=\"gatsby-code-text\">act()</code> doesn’t work well for you, and we’ll try to help.</p>\n<h3 id=\"performance-measurements-with-reactprofiler\"><a href=\"#performance-measurements-with-reactprofiler\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Performance Measurements with <a href=\"/docs/profiler.html\"><code class=\"gatsby-code-text\">&lt;React.Profiler></code></a> </h3>\n<p>In React 16.5, we introduced a new <a href=\"/blog/2018/09/10/introducing-the-react-profiler.html\">React Profiler for DevTools</a> that helps find performance bottlenecks in your application. <strong>In React 16.9, we are also adding a <em>programmatic</em> way to gather measurements</strong> called <code class=\"gatsby-code-text\">&lt;React.Profiler></code>. We expect that most smaller apps won’t use it, but it can be handy to track performance regressions over time in larger apps.</p>\n<p>The <code class=\"gatsby-code-text\">&lt;Profiler></code> measures how often a React application renders and what the «cost» of rendering is. Its purpose is to help identify parts of an application that are slow and may benefit from <a href=\"/docs/hooks-faq.html#how-to-memoize-calculations\">optimizations such as memoization</a>.</p>\n<p>A <code class=\"gatsby-code-text\">&lt;Profiler></code> can be added anywhere in a React tree to measure the cost of rendering that part of the tree.\nIt requires two props: an <code class=\"gatsby-code-text\">id</code> (string) and an <a href=\"/docs/profiler.html#onrender-callback\"><code class=\"gatsby-code-text\">onRender</code> callback</a> (function) which React calls any time a component within the tree «commits» an update.</p>\n<div class=\"gatsby-highlight has-highlighted-lines\" data-language=\"jsx\"><pre class=\"gatsby-code-jsx\"><code class=\"gatsby-code-jsx\"><span class=\"token function\">render</span><span class=\"token punctuation\">(</span>\n<span class=\"gatsby-highlight-code-line\">  <span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span><span class=\"token class-name\">Profiler</span></span> <span class=\"token attr-name\">id</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>application<span class=\"token punctuation\">\"</span></span> <span class=\"token attr-name\">onRender</span><span class=\"token script language-javascript\"><span class=\"token script-punctuation punctuation\">=</span><span class=\"token punctuation\">{</span>onRenderCallback<span class=\"token punctuation\">}</span></span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\"></span></span><span class=\"token plain-text\">    </span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span><span class=\"token class-name\">App</span></span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\"></span>\n<span class=\"token plain-text\">      </span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span><span class=\"token class-name\">Navigation</span></span> <span class=\"token spread\"><span class=\"token punctuation\">{</span><span class=\"token operator\">...</span>props<span class=\"token punctuation\">}</span></span> <span class=\"token punctuation\">/></span></span><span class=\"token plain-text\"></span>\n<span class=\"token plain-text\">      </span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span><span class=\"token class-name\">Main</span></span> <span class=\"token spread\"><span class=\"token punctuation\">{</span><span class=\"token operator\">...</span>props<span class=\"token punctuation\">}</span></span> <span class=\"token punctuation\">/></span></span><span class=\"token plain-text\"></span>\n<span class=\"token plain-text\">    </span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span><span class=\"token class-name\">App</span></span><span class=\"token punctuation\">></span></span><span class=\"token plain-text\"></span>\n<span class=\"gatsby-highlight-code-line\"><span class=\"token plain-text\">  </span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span><span class=\"token class-name\">Profiler</span></span><span class=\"token punctuation\">></span></span></span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<p> To learn more about the <code class=\"gatsby-code-text\">Profiler</code> and the parameters passed to the <code class=\"gatsby-code-text\">onRender</code> callback, check out <a href=\"/docs/profiler.html\">the <code class=\"gatsby-code-text\">Profiler</code> docs</a>.</p>\n<blockquote>\n<p>Note:</p>\n<p>Profiling adds some additional overhead, so <strong>it is disabled in <a href=\"https://reactjs.org/docs/optimizing-performance.html#use-the-production-build\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">the production build</a></strong>.</p>\n<p>To opt into production profiling, React provides a special production build with profiling enabled.\nRead more about how to use this build at <a href=\"https://fb.me/react-profiling\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">fb.me/react-profiling</a>.</p>\n</blockquote>\n<h2 id=\"notable-bugfixes\"><a href=\"#notable-bugfixes\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Notable Bugfixes </h2>\n<p>This release contains a few other notable improvements:</p>\n<ul>\n<li>A crash when calling <code class=\"gatsby-code-text\">findDOMNode()</code> inside a <code class=\"gatsby-code-text\">&lt;Suspense></code> tree <a href=\"https://github.com/facebook/react/pull/15312\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">has been fixed</a>.</li>\n<li>A memory leak caused by retaining deleted subtrees <a href=\"https://github.com/facebook/react/pull/16115\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">has been fixed</a> too.</li>\n<li>An infinite loop caused by <code class=\"gatsby-code-text\">setState</code> in <code class=\"gatsby-code-text\">useEffect</code> now <a href=\"https://github.com/facebook/react/pull/15180\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">logs an error</a>. (This is similar to the error you see when you call <code class=\"gatsby-code-text\">setState</code> in <code class=\"gatsby-code-text\">componentDidUpdate</code> in a class.)</li>\n</ul>\n<p>We’re thankful to all the contributors who helped surface and fix these and other issues. You can find the full changelog <a href=\"#changelog\">below</a>.</p>\n<h2 id=\"an-update-to-the-roadmap\"><a href=\"#an-update-to-the-roadmap\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>An Update to the Roadmap </h2>\n<p>In <a href=\"/blog/2018/11/27/react-16-roadmap.html\">November 2018</a>, we have posted this roadmap for the 16.x releases:</p>\n<ul>\n<li>A minor 16.x release with React Hooks (past estimate: Q1 2019)</li>\n<li>A minor 16.x release with Concurrent Mode (past estimate: Q2 2019)</li>\n<li>A minor 16.x release with Suspense for Data Fetching (past estimate: mid 2019)</li>\n</ul>\n<p>These estimates were too optimistic, and we’ve needed to adjust them.</p>\n<p><strong>tldr:</strong> We shipped Hooks on time, but we’re regrouping Concurrent Mode and Suspense for Data Fetching into a single release that we intend to release later this year.</p>\n<p>In February, we <a href=\"/blog/2019/02/06/react-v16.8.0.html\">shipped a stable 16.8 release</a> including React Hooks, with React Native support coming <a href=\"https://reactnative.dev/blog/2019/03/12/releasing-react-native-059\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">a month later</a>. However, we underestimated the follow-up work for this release, including the lint rules, developer tools, examples, and more documentation. This shifted the timeline by a few months.</p>\n<p>Now that React Hooks are rolled out, the work on Concurrent Mode and Suspense for Data Fetching is in full swing. The <a href=\"https://twitter.com/facebook/status/1123322299418124289\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">new Facebook website that’s currently in active development</a> is built on top of these features. Testing them with real code helped discover and address many issues before they can affect the open source users. Some of these fixes involved an internal redesign of these features, which has also caused the timeline to slip.</p>\n<p>With this new understanding, here’s what we plan to do next.</p>\n<h3 id=\"one-release-instead-of-two\"><a href=\"#one-release-instead-of-two\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>One Release Instead of Two </h3>\n<p>Concurrent Mode and Suspense <a href=\"https://developers.facebook.com/videos/2019/building-the-new-facebookcom-with-react-graphql-and-relay/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">power the new Facebook website</a> that’s in active development, so we are confident that they’re close to a stable state technically. We also now better understand the concrete steps before they are ready for open source adoption.</p>\n<p>Originally we thought we would split Concurrent Mode and Suspense for Data Fetching into two releases. We’ve found that this sequencing is confusing to explain because these features are more related than we thought at first. So we plan to release support for both Concurrent Mode and Suspense for Data Fetching in a single combined release instead.</p>\n<p>We don’t want to overpromise the release date again. Given that we rely on both of them in production code, we expect to provide a 16.x release with opt-in support for them this year.</p>\n<h3 id=\"an-update-on-data-fetching\"><a href=\"#an-update-on-data-fetching\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>An Update on Data Fetching </h3>\n<p>While React is not opinionated about how you fetch data, the first release of Suspense for Data Fetching will likely focus on integrating with <em>opinionated data fetching libraries</em>. For example, at Facebook we are using upcoming Relay APIs that integrate with Suspense. We will document how other opinionated libraries like Apollo can support a similar integration.</p>\n<p>In the first release, we <em>don’t</em> intend to focus on the ad-hoc «fire an HTTP request» solution we used in earlier demos (also known as «React Cache»). However, we expect that both we and the React community will be exploring that space in the months after the initial release.</p>\n<h3 id=\"an-update-on-server-rendering\"><a href=\"#an-update-on-server-rendering\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>An Update on Server Rendering </h3>\n<p>We have started the work on the <a href=\"/blog/2018/11/27/react-16-roadmap.html#suspense-for-server-rendering\">new Suspense-capable server renderer</a>, but we <em>don’t</em> expect it to be ready for the initial release of Concurrent Mode. This release will, however, provide a temporary solution that lets the existing server renderer emit HTML for Suspense fallbacks immediately, and then render their real content on the client. This is the solution we are currently using at Facebook ourselves until the streaming renderer is ready.</p>\n<h3 id=\"why-is-it-taking-so-long\"><a href=\"#why-is-it-taking-so-long\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Why Is It Taking So Long? </h3>\n<p>We’ve shipped the individual pieces leading up to Concurrent Mode as they became stable, including <a href=\"/blog/2018/03/29/react-v-16-3.html\">new context API</a>, <a href=\"/blog/2018/10/23/react-v-16-6.html\">lazy loading with Suspense</a>, and <a href=\"/blog/2019/02/06/react-v16.8.0.html\">Hooks</a>. We are also eager to release the other missing parts, but <a href=\"/docs/design-principles.html#dogfooding\">trying them at scale</a> is an important part of the process. The honest answer is that it just took more work than we expected when we started. As always, we appreciate your questions and feedback on <a href=\"https://twitter.com/reactjs\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Twitter</a> and in our <a href=\"https://github.com/facebook/react/issues\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">issue tracker</a>.</p>\n<h2 id=\"installation\"><a href=\"#installation\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Installation </h2>\n<h3 id=\"react\"><a href=\"#react\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>React </h3>\n<p>React v16.9.0 is available on the npm registry.</p>\n<p>To install React 16 with Yarn, run:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"gatsby-code-bash\"><code class=\"gatsby-code-bash\"><span class=\"token function\">yarn</span> <span class=\"token function\">add</span> react@^16.9.0 react-dom@^16.9.0</code></pre></div>\n<p>To install React 16 with npm, run:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"gatsby-code-bash\"><code class=\"gatsby-code-bash\"><span class=\"token function\">npm</span> <span class=\"token function\">install</span> --save react@^16.9.0 react-dom@^16.9.0</code></pre></div>\n<p>We also provide UMD builds of React via a CDN:</p>\n<div class=\"gatsby-highlight\" data-language=\"html\"><pre class=\"gatsby-code-html\"><code class=\"gatsby-code-html\"><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>script</span> <span class=\"token attr-name\">crossorigin</span> <span class=\"token attr-name\">src</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>https://unpkg.com/react@16/umd/react.production.min.js<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span><span class=\"token script\"></span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>script</span><span class=\"token punctuation\">></span></span>\n<span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;</span>script</span> <span class=\"token attr-name\">crossorigin</span> <span class=\"token attr-name\">src</span><span class=\"token attr-value\"><span class=\"token punctuation attr-equals\">=</span><span class=\"token punctuation\">\"</span>https://unpkg.com/react-dom@16/umd/react-dom.production.min.js<span class=\"token punctuation\">\"</span></span><span class=\"token punctuation\">></span></span><span class=\"token script\"></span><span class=\"token tag\"><span class=\"token tag\"><span class=\"token punctuation\">&lt;/</span>script</span><span class=\"token punctuation\">></span></span></code></pre></div>\n<p>Refer to the documentation for <a href=\"/docs/installation.html\">detailed installation instructions</a>.</p>\n<h2 id=\"changelog\"><a href=\"#changelog\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Changelog </h2>\n<h3 id=\"react\"><a href=\"#react\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>React </h3>\n<ul>\n<li>Add <code class=\"gatsby-code-text\">&lt;React.Profiler></code> API for gathering performance measurements programmatically. (<a href=\"https://github.com/bvaughn\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@bvaughn</a> in <a href=\"https://github.com/facebook/react/pull/15172\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15172</a>)</li>\n<li>Remove <code class=\"gatsby-code-text\">unstable_ConcurrentMode</code> in favor of <code class=\"gatsby-code-text\">unstable_createRoot</code>. (<a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a> in <a href=\"https://github.com/facebook/react/pull/15532\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15532</a>)</li>\n</ul>\n<h3 id=\"react-dom\"><a href=\"#react-dom\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>React DOM </h3>\n<ul>\n<li>Deprecate old names for the <code class=\"gatsby-code-text\">UNSAFE_*</code> lifecycle methods. (<a href=\"https://github.com/bvaughn\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@bvaughn</a> in <a href=\"https://github.com/facebook/react/pull/15186\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15186</a> and <a href=\"https://github.com/threepointone\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@threepointone</a> in <a href=\"https://github.com/facebook/react/pull/16103\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#16103</a>)</li>\n<li>Deprecate <code class=\"gatsby-code-text\">javascript:</code> URLs as a common attack surface. (<a href=\"https://github.com/sebmarkbage\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@sebmarkbage</a> in <a href=\"https://github.com/facebook/react/pull/15047\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15047</a>)</li>\n<li>Deprecate uncommon «module pattern» (factory) components. (<a href=\"https://github.com/sebmarkbage\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@sebmarkbage</a> in <a href=\"https://github.com/facebook/react/pull/15145\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15145</a>)</li>\n<li>Add support for the <code class=\"gatsby-code-text\">disablePictureInPicture</code> attribute on <code class=\"gatsby-code-text\">&lt;video></code>. (<a href=\"https://github.com/eek\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@eek</a> in <a href=\"https://github.com/facebook/react/pull/15334\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15334</a>)</li>\n<li>Add support for <code class=\"gatsby-code-text\">onLoad</code> event for <code class=\"gatsby-code-text\">&lt;embed></code>. (<a href=\"https://github.com/cherniavskii\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@cherniavskii</a> in <a href=\"https://github.com/facebook/react/pull/15614\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15614</a>)</li>\n<li>Add support for editing <code class=\"gatsby-code-text\">useState</code> state from DevTools. (<a href=\"https://github.com/bvaughn\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@bvaughn</a> in <a href=\"https://github.com/facebook/react/pull/14906\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#14906</a>)</li>\n<li>Add support for toggling Suspense from DevTools. (<a href=\"https://github.com/gaearon\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@gaearon</a> in <a href=\"https://github.com/facebook/react/pull/15232\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15232</a>)</li>\n<li>Warn when <code class=\"gatsby-code-text\">setState</code> is called from <code class=\"gatsby-code-text\">useEffect</code>, creating a loop. (<a href=\"https://github.com/gaearon\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@gaearon</a> in <a href=\"https://github.com/facebook/react/pull/15180\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15180</a>)</li>\n<li>Fix a memory leak. (<a href=\"https://github.com/paulshen\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@paulshen</a> in <a href=\"https://github.com/facebook/react/pull/16115\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#16115</a>)</li>\n<li>Fix a crash inside <code class=\"gatsby-code-text\">findDOMNode</code> for components wrapped in <code class=\"gatsby-code-text\">&lt;Suspense></code>. (<a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a> in <a href=\"https://github.com/facebook/react/pull/15312\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15312</a>)</li>\n<li>Fix pending effects from being flushed too late. (<a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a> in <a href=\"https://github.com/facebook/react/pull/15650\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15650</a>)</li>\n<li>Fix incorrect argument order in a warning message. (<a href=\"https://github.com/brickspert\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@brickspert</a> in <a href=\"https://github.com/facebook/react/pull/15345\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15345</a>)</li>\n<li>Fix hiding Suspense fallback nodes when there is an <code class=\"gatsby-code-text\">!important</code> style. (<a href=\"https://github.com/acdlite\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@acdlite</a> in <a href=\"https://github.com/facebook/react/pull/15861\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15861</a> and <a href=\"https://github.com/facebook/react/pull/15882\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15882</a>)</li>\n<li>Slightly improve hydration performance. (<a href=\"https://github.com/bmeurer\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@bmeurer</a> in <a href=\"https://github.com/facebook/react/pull/15998\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15998</a>)</li>\n</ul>\n<h3 id=\"react-dom-server\"><a href=\"#react-dom-server\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>React DOM Server </h3>\n<ul>\n<li>Fix incorrect output for camelCase custom CSS property names. (<a href=\"https://github.com/bedakb\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@bedakb</a> in <a href=\"https://github.com/facebook/react/pull/16167\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#16167</a>)</li>\n</ul>\n<h3 id=\"react-test-utilities-and-test-renderer\"><a href=\"#react-test-utilities-and-test-renderer\" aria-hidden class=\"anchor\"><svg aria-hidden=\"true\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>React Test Utilities and Test Renderer </h3>\n<ul>\n<li>Add <code class=\"gatsby-code-text\">act(async () => ...)</code> for testing asynchronous state updates. (<a href=\"https://github.com/threepointone\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@threepointone</a> in <a href=\"https://github.com/facebook/react/pull/14853\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#14853</a>)</li>\n<li>Add support for nesting <code class=\"gatsby-code-text\">act</code> from different renderers. (<a href=\"https://github.com/threepointone\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@threepointone</a> in <a href=\"https://github.com/facebook/react/pull/16039\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#16039</a> and <a href=\"https://github.com/facebook/react/pull/16042\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#16042</a>)</li>\n<li>Warn in Strict Mode if effects are scheduled outside an <code class=\"gatsby-code-text\">act()</code> call. (<a href=\"https://github.com/threepointone\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@threepointone</a> in <a href=\"https://github.com/facebook/react/pull/15763\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15763</a> and <a href=\"https://github.com/facebook/react/pull/16041\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#16041</a>)</li>\n<li>Warn when using <code class=\"gatsby-code-text\">act</code> from the wrong renderer. (<a href=\"https://github.com/threepointone\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">@threepointone</a> in <a href=\"https://github.com/facebook/react/pull/15756\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">#15756</a>)</li>\n</ul>","excerpt":"Today we are releasing React 16.9. It contains several new features, bugfixes, and new deprecation warnings to help prepare for a future major release.  New Deprecations  Renaming Unsafe Lifecycle Methods  Over a year ago, we announced that unsafe lifecycle methods are getting renamed:  →   →   →  React 16.9 does not contain breaking changes, and the old names continue to work in this release. But you will now see a warning when using any of the old names: Warning: componentWillMount has been…","frontmatter":{"title":"React v16.9.0 and the Roadmap Update","next":null,"prev":null,"author":[{"frontmatter":{"name":"Dan Abramov","url":"https://twitter.com/dan_abramov"}},{"frontmatter":{"name":"Brian Vaughn","url":"https://github.com/bvaughn"}}]},"fields":{"date":"07 августа, 2019","path":"content\\blog\\2019-08-08-react-v16.9.0.md","slug":"/blog/2019/08/08/react-v16.9.0.html"}},"allMarkdownRemark":{"edges":[{"node":{"frontmatter":{"title":"React Labs: What We've Been Working On — June 2022"},"fields":{"slug":"/blog/2022/06/15/react-labs-what-we-have-been-working-on-june-2022.html"}}},{"node":{"frontmatter":{"title":"React v18.0"},"fields":{"slug":"/blog/2022/03/29/react-v18.html"}}},{"node":{"frontmatter":{"title":"How to Upgrade to React 18"},"fields":{"slug":"/blog/2022/03/08/react-18-upgrade-guide.html"}}},{"node":{"frontmatter":{"title":"React Conf 2021 Recap"},"fields":{"slug":"/blog/2021/12/17/react-conf-2021-recap.html"}}},{"node":{"frontmatter":{"title":"The Plan for React 18"},"fields":{"slug":"/blog/2021/06/08/the-plan-for-react-18.html"}}},{"node":{"frontmatter":{"title":"Introducing Zero-Bundle-Size React Server Components"},"fields":{"slug":"/blog/2020/12/21/data-fetching-with-react-server-components.html"}}},{"node":{"frontmatter":{"title":"React v17.0"},"fields":{"slug":"/blog/2020/10/20/react-v17.html"}}},{"node":{"frontmatter":{"title":"Introducing the New JSX Transform"},"fields":{"slug":"/blog/2020/09/22/introducing-the-new-jsx-transform.html"}}},{"node":{"frontmatter":{"title":"React v17.0 Release Candidate: No New Features"},"fields":{"slug":"/blog/2020/08/10/react-v17-rc.html"}}},{"node":{"frontmatter":{"title":"React v16.13.0"},"fields":{"slug":"/blog/2020/02/26/react-v16.13.0.html"}}}]}},"pageContext":{"slug":"/blog/2019/08/08/react-v16.9.0.html"}},"staticQueryHashes":[]}